<?php

namespace App\Listeners;

use App\Jobs\CloseOrderJob;
use App\Events\OrderCreatedEvent;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Queue\InteractsWithQueue;

class OrderCreatedListener
{
    public function handle(OrderCreatedEvent $event)
    {
    	// Close unpaid order.
        dispatch(new CloseOrderJob($event->order));
    }
}
